<?php
	include CHEMIN_MODELE.'get_annee_scolaire.php';

	// get the HTML
	$forum = new Forum($_GET[ID_FORUM]);
	$forum->getOneForum();
	$ficheBilanForum = new FicheBilanForum($_GET[ID_FORUM]);
	$ficheBilanForum->getOneFicheBilanForum();
	$EvalEtudiants = $ficheBilanForum->get_evaluation_fiche_forum();

	$annee_scolaire = get_annee_scolaire($forum->get_date());
	$code_forum = $forum->get_code();

	ob_start();
	include(CHEMIN_VUE.'templateFicheBilanForum.php');
	$content = ob_get_clean();

	require_once(CHEMIN_LIB.'html2pdf_v4.03/html2pdf.class.php');
	// convert in PDF
	try
	{
		$html2pdf = new HTML2PDF('P', 'A4', 'fr', true, 'UTF-8', 20);
		$html2pdf->writeHTML($content);
		$html2pdf->Output($code_forum.'_-_'.$annee_scolaire.'.pdf', 'D');
	}
	catch(HTML2PDF_exception $e)
	{
		echo $e;
		exit;
	}
	exit;
?>